import axios from 'axios';
import apiClient from '@/services/axiosConfig';
import router from '@/router';

/**
 * 根据套餐id返回体检报告项目(大项)
 * @param {套餐ID} smid 
 * @returns 
 */
export const getCheckitemBySmidApi = async (smid) => {
    try {
        const response = await axios.get(`http://localhost:9000/checkitem/getCheckitemBySmid?smid=${smid}`)
        return response.data;
    } catch (error) {
        console.error(error)
    }
}

/**
 * 根据订单ID返回体检报告项目(小项)
 * @param {订单ID} orderId 
 * @returns 
 */
export const getCheckitemApi = async (orderId) => {
    try {
        const response = await axios.get(`http://localhost:9000/checkitem/getCheckitem?orderId=${orderId}`)
        return response.data;
    } catch (error) {
        console.error(error)
    }
}
